﻿@model EWSelectionItemDefinitionCollection
@{
    var ownerId = this.Url.RequestContext.RouteData.Values["id"];
}
<div class="easyweb-ewselectionitems">
    <table class="ui-widget ui-helper-reset easyweb-ewsimple">
        <thead class="ui-helper-reset ui-widget-content">
            <tr>
                <th style="width: 30em;">@typeof(EWSelectionItemDefinition).GetDisplayName("Key")</th>
                <th>@typeof(EWSelectionItemDefinition).GetDisplayName("Value")</th>
            </tr>
        </thead>
        <tbody class="ui-helper-reset ui-widget-content">
            @foreach (var item in Model.OrderBy(m => m.Key))
            {
                <tr>
                    <td style="width: 30em;">@Html.RouteLink(item.Key, "EasyWeb_SelectionItem", new { action = "Details", ownerId = ownerId, id = item.Id })</td>
                    <td>@item.Value.Value</td>
                </tr>
            }
        </tbody>
    </table>
</div>
